/**
 * Generate time : 2011-06-16 10:58:08
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cl.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCLPointAssociation
 * 
 */
public class ZMCLPointAssociation extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdSecuritypathId = " "; /* 巡检路线主键 */
	private String fdSurveypointId = " "; /* 安全巡检点主键 */
	private Long fdPathSerial = new Long(0); /* 巡检顺序 */
	private String fdStatus = " "; /* 保存状态 */
	private String fdSurveypointCode = " "; /* 巡检点编号 */
	private String fdSurveypointName = " "; /* 巡检点名称 */
	private String fdPosition = " "; /* 巡检点位置 */
	private String fdSmartphone = " "; /* 井下电话 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSecuritypathId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("巡检路线主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSurveypointId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("安全巡检点主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPathSerial");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("巡检顺序");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("保存状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSurveypointCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("巡检点编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSurveypointName");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("巡检点名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPosition");
		eiColumn.setFieldLength(200);
		eiColumn.setDescName("巡检点位置");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSmartphone");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("井下电话");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCLPointAssociation() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdSecuritypathId - 巡检路线主键
	 * 
	 * @return the fdSecuritypathId
	 */
	public String getFdSecuritypathId() {
		return this.fdSecuritypathId;
	}

	/**
	 * set the fdSecuritypathId - 巡检路线主键
	 */
	public void setFdSecuritypathId(String fdSecuritypathId) {
		this.fdSecuritypathId = fdSecuritypathId;
	}

	/**
	 * get the fdSurveypointId - 安全巡检点主键
	 * 
	 * @return the fdSurveypointId
	 */
	public String getFdSurveypointId() {
		return this.fdSurveypointId;
	}

	/**
	 * set the fdSurveypointId - 安全巡检点主键
	 */
	public void setFdSurveypointId(String fdSurveypointId) {
		this.fdSurveypointId = fdSurveypointId;
	}

	/**
	 * get the fdPathSerial - 巡检顺序
	 * 
	 * @return the fdPathSerial
	 */
	public Long getFdPathSerial() {
		return this.fdPathSerial;
	}

	/**
	 * set the fdPathSerial - 巡检顺序
	 */
	public void setFdPathSerial(Long fdPathSerial) {
		this.fdPathSerial = fdPathSerial;
	}

	/**
	 * get the fdStatus - 保存状态
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 保存状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * @return the fdSurveypointCode
	 */
	public String getFdSurveypointCode() {
		return fdSurveypointCode;
	}

	/**
	 * @param fdSurveypointCode
	 *            the fdSurveypointCode to set
	 */
	public void setFdSurveypointCode(String fdSurveypointCode) {
		this.fdSurveypointCode = fdSurveypointCode;
	}

	/**
	 * @return the fdSurveypointName
	 */
	public String getFdSurveypointName() {
		return fdSurveypointName;
	}

	/**
	 * @param fdSurveypointName
	 *            the fdSurveypointName to set
	 */
	public void setFdSurveypointName(String fdSurveypointName) {
		this.fdSurveypointName = fdSurveypointName;
	}

	/**
	 * @return the fdPosition
	 */
	public String getFdPosition() {
		return fdPosition;
	}

	/**
	 * @param fdPosition
	 *            the fdPosition to set
	 */
	public void setFdPosition(String fdPosition) {
		this.fdPosition = fdPosition;
	}

	/**
	 * @return the fdSmartphone
	 */
	public String getFdSmartphone() {
		return fdSmartphone;
	}

	/**
	 * @param fdSmartphone
	 *            the fdSmartphone to set
	 */
	public void setFdSmartphone(String fdSmartphone) {
		this.fdSmartphone = fdSmartphone;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdSecuritypathId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSecuritypathId")), fdSecuritypathId));
		setFdSurveypointId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSurveypointId")), fdSurveypointId));
		setFdPathSerial(NumberUtils.toLong(StringUtils.toString(map.get("fdPathSerial")), fdPathSerial));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setFdSurveypointCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSurveypointCode")), fdSurveypointCode));
		setFdSurveypointName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSurveypointName")), fdSurveypointName));
		setFdPosition(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPosition")), fdPosition));
		setFdSmartphone(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSmartphone")), fdSmartphone));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdSecuritypathId", StringUtils.toString(fdSecuritypathId, eiMetadata.getMeta("fdSecuritypathId")));
		map.put("fdSurveypointId", StringUtils.toString(fdSurveypointId, eiMetadata.getMeta("fdSurveypointId")));
		map.put("fdPathSerial", StringUtils.toString(fdPathSerial, eiMetadata.getMeta("fdPathSerial")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));
		map.put("fdSurveypointCode", StringUtils.toString(fdSurveypointCode, eiMetadata.getMeta("fdSurveypointCode")));
		map.put("fdSurveypointName", StringUtils.toString(fdSurveypointName, eiMetadata.getMeta("fdSurveypointName")));
		map.put("fdPosition", StringUtils.toString(fdPosition, eiMetadata.getMeta("fdPosition")));
		map.put("fdSmartphone", StringUtils.toString(fdSmartphone, eiMetadata.getMeta("fdSmartphone")));

		return map;

	}
}